<%--
  User: wyz
  Date: 2024/7/22
  Time: 16:04
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>库存管理</title>
    <script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/back/css/echarts.css" />

</head>
<body>

<%@include file="../common/header.jsp"%>
<div class="container clearfix">
    <%@include file="../common/menu.jsp"%>
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list">
                <i class="icon-font"></i>
                <a href="http://localhost:8080/back/index.jsp">首页</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">库存管理</span>
            </div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="../inventory/search.do" method="get">
                    <input type="hidden" name="page" value="1">
                    <table class="search-tab">
                        <tr>

                            <th width="70">关键字:</th>
                            <td>
                                <input class="common-text" placeholder="关键字"  name="condition" id="" type="text" />
                            </td>
                            <td>
                                <input class="btn btn-primary btn2" name="sub" value="查询" type="submit"/>
                            </td>
                            <th width="70"><p></p ></th>
                            <td>
                                <div class="common-text">
                                    <label for="category"  placeholder="请选择依据排序的字段"></label>
                                    <select name="sort" id="category">
                                        <option value=""  disabled selected>请选择依据排序的字段</option>
                                        <option value="inventory_id">库存编号</option>
                                        <option value="inventory_time">时间</option>
                                        <%--                                                <option value="supplierCompany">供应商公司名</option>--%>
                                        <%--                                                <option value="supplierName">供应商负责人</option>--%>

                                    </select>
                                </div>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <table class="result-tab" width="100%">
                    <thead>
                    <tr>
                        <th>库存编号</th>
                        <th>商品编码</th>
                        <th>供货商</th>
                        <th>进货人</th>
                        <th>商品名称</th>
                        <th>数量</th>
                        <th>详细资料</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${inventory}" var="inventory">
                    <tr>
                        <td>${inventory.inventoryId}</td>
                        <td>${inventory.goodsBarcode}</td>
                        <td>${inventory.supplierCompany}</td>
                        <td>${inventory.instoragePersonInformation}</td>
                        <td>${inventory.goodsName}</td>
                        <td>${inventory.inventoryNum}</td>
                        <td class="details"><a href="/inventory/getInventoryById?id=${inventory.inventoryId}">查看</a></td>

                    </tr>
                    </c:forEach>
                    </tbody>
                </table>


            </div>
        </div>

<div class="echarts">
    <div class="echarts1" id="main" style="width: 625px;height:500px;">
        <script>
            var chartDom = document.getElementById('main');
            var myChart = echarts.init(chartDom);
            var option;

            option = {
                xAxis: {
                    type: 'category',
                    data: ['张伟', '陈华', '王丽', '周杰', '刘洋', '宋强', '朱琳']
                },
                yAxis: {
                    type: 'value'
                },
                series: [
                    {
                        data: [
                            500,
                            {
                                value: 349,
                                itemStyle: {
                                    color: '#a90000'
                                }
                            },
                            345,
                            456,
                            222,
                            455,
                            666
                        ],
                        type: 'bar'
                    }
                ]
            };

            option && myChart.setOption(option);
        </script>
    </div>

    <div class="echarts2" id="main1" style="width: 624px;height:500px;">
        <script>


            var chartDom = document.getElementById('main1');
            var myChart = echarts.init(chartDom);
            var option;

            option = {
                legend: {
                    top: 'bottom'
                },
                toolbox: {
                    show: true,
                    feature: {
                        mark: { show: true },
                        dataView: { show: true, readOnly: false },
                        restore: { show: true },
                        saveAsImage: { show: true }
                    }
                },
                series: [
                    {
                        name: 'Nightingale Chart',
                        type: 'pie',
                        radius: [50, 250],
                        center: ['50%', '50%'],
                        roseType: 'area',
                        itemStyle: {
                            borderRadius: 8
                        },
                        data: [
                            { value: 500, name: '男士纯棉圆领T恤' },
                            { value: 349, name: '智能手表' },
                            { value: 345, name: '有机燕麦片' },
                            { value: 456, name: '北欧风格书架' },
                            { value: 222, name: '保湿面膜' },
                            { value: 455, name: '跑步鞋' },
                            { value: 666, name: '拼图' }
                        ]
                    }
                ]
            };

            option && myChart.setOption(option);

        </script>
    </div>
</div>

    </div>
</div>
<%@include file="../common/footer.jsp"%>

</body>
</html>
